package info.opensoaring.server.jdo;

import javax.jdo.annotations.EmbeddedOnly;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

@EmbeddedOnly
@PersistenceCapable
public class Fix {

    @Persistent
    private double latitude;

    @Persistent
    private double longitude;

    public Fix() {

    }

    public Fix(double latitude, double longitude) {
	this.latitude = latitude;
	this.longitude = longitude;
    }
    
    public double getLatitude() {
	return latitude;
    }

    public double getLatitudeRadians() {
	return Math.toRadians(latitude);
    }

    public void setLatitude(float latitude) {
	this.latitude = latitude;
    }

    public double getLongitude() {
	return longitude;
    }

    public double getLongitudeRadians() {
	return Math.toRadians(longitude);
    }

    public void setLongitude(float longitude) {
	this.longitude = longitude;
    }
}
